Secure execution of unsecured apps on a device

ABSTRACT

An app is secured on a mobile device by being deconstructed or unbundled into multiple modules, where a module is a segment of app code that performs a particular function. It is then determined which modules from the multiple modules perform some type of security function, for example, a function dealing with confidential or security-related data. These modules, forming a group of modules, are loaded into a trusted execution environment. The app is then re-bundled so that it has the first plurality of modules and the second plurality of modules. The app executes in a manner where the high security functions execute so that break points cannot be inserted into the app code. The re-bundling is done automatically in an app security wrapping process. Security constraints are added to the app.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation-in-Part which claims priority under35 U.S.C. §120 to pending U.S. patent application Ser. No. 13/309,387filed Dec. 1, 2011, entitled “SECURE EXECUTION OF UNSECURED APPS ON ADEVICE,” which is a continuation-in-part of pending U.S. patentapplication Ser. No. 13/052,973 filed Mar. 21, 2011, entitled “SECUREEXECUTION OF UNSECURED APPS ON A DEVICE,” which are hereby incorporatedby reference in their entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to software and mobile devices. Morespecifically, it relates to securing, governing, and managing apps ondevices, such as handsets, televisions, automobiles, and other emergingsmart device categories.

2. Description of the Related Art

One of the goals of security wrapping an app on a mobile device or anyother type of smart device is to ensure that the app and the mobiledevice, including data stored on the device, are protected, even in ahostile environment, including an execution environment of a rooted ormalware-infected device. For example, one way for a hacker to obtainsecure data from a mobile device is to insert break points into an app.This is often difficult to do because of the precision needed whendetermining the break points, but if the hacker has the resources (time,funds, and expertise), they can inspect the memory and execution of adevice and, through diligence, determine where the best places would beto insert these break points. The time available for these insertions isoften very small and, as noted, can normally only be obtained fromclosely examining execution of the device over a sufficiently longperiod of time. Once these break points have been inserted into an app,sensitive data, such as logon data, passcodes, data to perform a securehandshake, encrypting/decrypting protected data, and so on, may beexposed. As such, break point insertion remains a vulnerability. Itwould be desirable to prevent a hacker from inserting break points intoan app or prevent them from looking at device memory. It would also bedesirable to include DRM-type features in a wrapped app and stillmaintain the original or at least a favorable user experience for theapp.

SUMMARY OF THE INVENTION

One aspect of the present invention is a method of securing an app on amobile device. An app is deconstructed or unbundled into multiplemodules, where a module is a segment of app code that performs aparticular function. It is then determined which modules from themultiple modules perform some type of security function, for example, afunction dealing with confidential or security-related data. Thesemodules, forming a group of modules, are loaded into a trusted executionenvironment. The app is then re-bundled so that it has the firstplurality of modules and the second plurality of modules. The appexecutes in a manner where the high security functions execute so thatbreak points cannot be inserted into the app code. In one embodiment,the re-bundling is done automatically in an app security wrappingprocess. In another embodiment, security constraints are added to theapp. For example, one or more user identifiers are inserted into an appfile, where the users are authorized to use the app.

BRIEF DESCRIPTION OF THE DRAWINGS

References are made to the accompanying drawings, which form a part ofthe description and in which are shown, by way of illustration, specificembodiments of the present invention:

FIG. 1A is a block diagram showing an overview of the app controlprocess of the present invention;

FIG. 1B is a block diagram showing an alternative embodiment of an appcontrol process of the present invention;

FIG. 2 is a block diagram showing components of an app security programin accordance with one embodiment of the present invention;

FIG. 3 is a flow diagram showing a process of making an app securebefore downloading it on to a device in accordance with one embodimentof the present invention;

FIG. 4 is a flow diagram of a method performed in policy manager inaccordance with one embodiment;

FIG. 5 is a flow diagram showing a process of a security-wrapped appexecuting on a handset or mobile device in accordance with oneembodiment;

FIG. 6 is a system architecture diagram of the app security controlsystem in accordance with one embodiment;

FIG. 7 is a block diagram of components for securing an app on a deviceduring execution in accordance with one embodiment;

FIG. 8 is a flow diagram of a process of securing an app on a deviceduring execution of the app using integrated functionality of the devicein accordance with one embodiment;

FIG. 9 is a flow diagram of a process of making an app secure beforedownloading it using a template, followed by personalizing the app, inaccordance with one embodiment of the present invention;

FIG. 10 is a block diagram showing an overview of the process ofsegmenting an app through security wrapping in accordance with oneembodiment;

FIG. 11 is a block diagram of a mobile device and various logicalcomponents and execution areas within the device in accordance with oneembodiment; and

FIGS. 12A and 12B are block diagrams of a computing system suitable forimplementing various embodiments of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Example embodiments of an application security process and system aredescribed. These examples and embodiments are provided solely to addcontext and aid in the understanding of the invention. Thus, it will beapparent to one skilled in the art that the present invention may bepracticed without some or all of the specific details described herein.In other instances, well-known concepts have not been described indetail in order to avoid unnecessarily obscuring the present invention.Other applications and examples are possible, such that the followingexamples, illustrations, and contexts should not be taken as definitiveor limiting either in scope or setting. Although these embodiments aredescribed in sufficient detail to enable one skilled in the art topractice the invention, these examples, illustrations, and contexts arenot limiting, and other embodiments may be used and changes may be madewithout departing from the spirit and scope of the invention.

Methods and system for preventing device software applications frominfecting or otherwise damaging a device, in particular, a mobiledevice, are described in the various figures. These types ofapplications, used often on a variety of mobile devices, such as smartphones, tablet computers, gaming devices, and portable computing devicesare commonly referred to as “apps.” These apps may also be downloaded onto non-mobile devices, such as TVs, computers, automobiles, and otheremerging smart device categories. Methods and systems described are notintended to be limited to operation on mobile devices. These deviceprograms or apps have proliferated and are now very prevalent.Currently, apps are typically written in either Java or C. The methodsand systems described herein may be applied to apps written in either orto apps written in other languages for different platforms. Most apps,if not all, have to communicate with the mobile device's operatingsystem to get a specific service that the app needs in order to performits intended function and this service is usually only available fromthe operating system. A common example of such a service used is GPS toget the location of the device which the app may need. However, becauseof this exposure, apps are a vulnerability for the device and pose asecurity and privacy risk for the user. Companies want to be ableenforce a centralized policy to control and secure access to its dataand software. This is also true for end users (i.e., individuals, homeusers, and the like). It enables enterprise IT departments to maintaingovernance of corporate data. The methods described below provide acentralized way to control security with respect to apps that aredownloaded onto mobile devices, where the devices are either anemployee's personal phone or an employer's phone, so that those apps donot pose a security threat. Various embodiments of the invention mayalso be used by parents and individuals (i.e., in home or non-workenvironments) to ensure that their personal mobile devices are safe frommalware and may also be used to apply controls, such as on usage.Embodiments of the app control software of the present invention mayalso be used for mobile device data protection and back-up and forapplication-level telemetry.

FIG. 1A is a block diagram showing an overview of the app controlprocess of the present invention. It is a generic description of oneprocess without being tied to a specific configuration or environment.An app 102 is provided by app provider 100 which can be any type ofentity (individual, software developer, employer, etc.). It is generallyunprotected and the only security surrounding it is provided by theoperating system. The only shield and checking done on how it executeson the device once loaded is provided by the operating system.

The present invention enables additional security of the apps that isnot provided by the device's operating system. A security applicationprogram 104 is applied to app 102. Or the app 102 is input to program104, which may be supplied by a third-party app security provider. Inone embodiment, security application program 104 has a policy managerand a policy wrapper which may be in different locations. They aredescribed in greater detail in FIG. 2. Once security program 104 hasbeen applied to app 102, the app is wrapped with a security layer sothat the device is protected. It is shown as secured app 106. In oneembodiment, secured app 106 is then downloaded onto a mobile device 108,such as a smart phone or tablet computer, where it executes securelywithout risking damage to device 108. Another benefit is that securedapp 106 may also be managed by the company or other entity that isproviding the app to the user, such as an employer providing the app toan employee. For example, if the user leaves the company, the companymay automatically delete the app and any related data from the device.In another example, a parent may be able to limit the apps used byanother person (e.g., a child) or to limit the amount of time, e.g., 10minutes a day or limit which Web sites may be accessed by an app. Or, aparent is concerned that an app is leaking a child's location to unknownthird parties. There may be numerous other examples. As noted, FIG. 1Ais intended to show the general process of securing an app anddownloading it onto a device. Note that in this embodiment, app 102 isnot made secure from causing harm to the device after it is downloadedonto the device, but before. In another embodiment, the app is securedafter it is downloaded onto the device, but before it can interact withthe operating system.

FIG. 1B is a block diagram showing an alternative embodiment. Anunsecured app 110 (also supplied by an app provider) is downloaded ontomobile device 112. In this embodiment, however, there may be a speciallydesigned app on device 112 that blocks the actual installation ofunsecured app 110. The special app (not shown) redirects unsecured app110 to an app security program 114. The unsecured app 110 is wrapped ina security policy, the resulting app shown as secured app 116. It isthen downloaded and allowed to be installed on device 112 by the specialapp. In this manner, an individual or home user, for example, who wantsto protect her phone from security threats posed by apps, can have appsmade secure (wrapped) by a third-party service or by her mobile phonecarrier, to mention only two examples, before they are downloaded on toher phone. It should be noted that this security wrapping can be done toan app regardless of where the user downloads the app from. It may alsobe noted that in FIGS. 1A and 1B, the network and connections betweenthe components and software are shown generically. The transmissions areprimarily over the Internet (not shown) but may also be within a privatenetwork or both.

FIG. 2 is a block diagram showing components of an app security programin accordance with one embodiment of the present invention. In oneembodiment, the security program has two major components, a policymanager and a policy wrapper. A policy manager 202 accepts input from anadministrator or other individual who is responsible for settingsecurity for the mobile device. The person may be referred to as thegovernor since he is governing the security of the one or more mobiledevices. The security policy may be set using various user interfacescreens. There are numerous examples of policies, including geo-fencing(e.g., the app can only be used in a building) and others. The serviceprovider or the entity providing the app security program may alsoprovide default policy and security settings which may be useful forhome users. Examples of policy settings are described below. Policyinput 204 is inputted into policy manager 202. Policy manager 202 takesthe input/settings from the governor and creates policies or meta-data206. The format or form of meta-data 206 can vary. They essentiallyreflect the policy settings from the governor.

Metadata (policies) 206 may be used as input to a policy wrapper 208. Inone embodiment, this component of the program takes the policies anduses them to secure an app 210 by wrapping it. Wrapper 208 receives anapp 210 from a handheld device 212. In one embodiment, wrapper 208receives a copy of an app 210 instead of the original app 214 that wasdownloaded onto phone 212 (see FIG. 1B above). Here the handheld device212 user attempts to download an unsecured app 216 from an app provider218. In the scenario in described in FIG. 1A, it may operate on the appitself instead of a copy. This may be the case where a market place orapp store offers customers a secured version of the app along with anunsecured version (or only offer the secured version). A secured version220 (security-wrapped version) is returned from policy wrapper 208 todevice 212.

Metadata 206 may also be used to update a local policy file (an existingpolicy that is already on the device). A local policy file is used toupdate policy parameters residing on device 212. For example, in thecase of “geofencing” (i.e., restricting use of an app to an certainphysical areas) it is likely that the GPS locations controlled by thegovernor will change over time. When such a change occurs, the newpolicies can be applied in two different ways. One is to generate a newpolicy and apply it to the original app (i.e., wrap the app with the newpolicy). Another way is to allow dynamic configuration based on a localpolicy data file with the “variable” part of the policy encrypted/signedinside it. For example, an IT person may want the ability to override aconfiguration on a device directly through an IT app residing on thedevice for diagnostic purposes.

In one embodiment policies have two components: a fixed part and avariable part. The fixed part is the content described in the policyfile (e.g., “protect the GPS at certain times of day”). The variablepart typically is provided by the governor through a console (e.g. “whatare the times when the GPS should be protected?”). The variable part canchange without applying a new policy.

Policy designers can choose to forego the variable component of thepolicy and basically “embed” all data or content statically in thepolicy file. In this case, the console does not have any way tocustomize the policy.

If the policy designer chooses to include some variable component in thepolicy, when changes are made to the variable data (on the console), anew data file could be sent to the device to reflect the latest changes.Such a file would be encrypted/signed (to prevent a malicious appcircumventing the policy), downloaded to the device, and used by the appsecurity code on the device to apply the new data to the appropriatepolicy.

Such changes and updates may be done by local policy update component222 at runtime. This component creates updated policy parameters ondevice 212. Thereafter, wrapped app 220 will use the updated policyparameters.

In one embodiment, policy manager 202 and policy wrapper 208 arecomponents in the same app security program and may operate on the samecomputer. In other embodiments, the manager and wrapper components maybe on separate computers. For example, the policy manager 202 may be ona server at one site and the policy wrapper 208 may be on a computer atanother site and may be managed by a different entity or the sameentity. Collectively the manager and wrapper form the app securityprogram which, in one embodiment, is operated by a security serviceprovider. It may also be provided by an enterprise, such as a company,employer, business partner, and the like, or by a mobile phone carrier.

FIG. 3 is a flow diagram showing a process of making an app securebefore downloading it on to a device in accordance with one embodimentof the present invention. At step 302 a copy or clone of the app that isto be secured is made on the device. In one embodiment, this may be doneon the mobile device itself or may be done off the device, for example,on components on the Internet, in the cloud, on an enterprise's serveror on a carrier server. The user may be an individual, an employee of acompany or other entity. As is known in the field, an app may beobtained in a number of ways, most typically from an app store or an appmarket, or directly from the app developer or provider or in anysuitable manner. By making a copy, the original app is preserved givingthe user an option to use either the secured or unsecured version andalso protects the user's ability to use the app if something goes wrongwith the app control process. Note that in one embodiment, the app isnot yet downloaded on to the phone. In one embodiment, the methodsdescribed below are performed on separate computing devices. In anotherembodiment, the process may be performed on a mobile device, but the appis only executed on the device after the process is complete and the apphas been made secure.

At step 304 the app is decapsulated. Most, if not all, apps have digitalsignatures signed by the author/developer. At step 304, as part of thedecapsulation, the digital signature is removed from the app. This maybe done using techniques known in the art. Decrypting the app may alsobe performed at this step. These and other steps provide the core objectcode of the app which may now be operated on by the app control program.The nature and specifics of this operation may depend on the mobiledevice's operating system.

There are several examples of operating systems for smart phones such asiOS (for the iPhone), Android (used on handsets from variousmanufacturers), Windows Mobile 7, Web O/S, Palm, and others. At step306, the core object code app may be either disassembled or decompiledto obtain the executable object code. For example, it can be either“native code” (CPU instructions) or bytecode (virtual machineinstructions, such as Java or .Net). In one embodiment, this may be moreof a modification process if the device runs iOS where the disassemblyis closer to a process of locating and substituting certain links andterms. However, in general, the disassembly process to obtain the objectcode of an app after it has been decapsulated may be done usingtechniques known in the art, such as using disassemblers.

At step 308 the app object code is augmented with object code from theapp security program. For example, this object code may include classfiles which are replaced with class files from the security program. Theobject code generally provides an interface to the mobile deviceoperating system. The app control security program object code isderived, in part, from the policy/meta-data described above. In the caseof iOS, the operation is different in that a ‘locate and substitute’process occurs rather than an object code replacement. This takes intoconsideration an interrupt approach that iOS's uses. Generally, the appsecurity program goes through the assembly language code. The specificitems located are Software Interrupts (SWIs) within the object code andwhich are replaced with a branch to an app control security programlayer which may then determine what further actions to take, such asmaking the request, enhancing the results, and others, as describedbelow.

At step 310, after substitution of the object code (or substitutions ofSWIs) has been made, the app security program prepares the securitywrapped app for execution on the mobile device. The object codesubstituted into the app by the security program generally provides abridge or connection between the app and the mobile device operatingsystem. The security program class files may be described as wrappingaround the operating system class files. The app security program classfiles are generated based on the policies created earlier (by input fromthe governor). The app is essentially re-wired for execution on thehandset. It is re-wired to use the app security program layer inaddition to the security provided by the mobile device operating systemlayer. That is, the secured app may still be subject to the securityprovisions of the operating system. In one embodiment, certain cosmeticchanges may also be made to the app, such as changing the icon for theapp to reflect that it is secured. By doing this, the user can be surethat when the app icon appears on the handset screen that the securedversion of the app will be executed. The app has now essentially beenre-factored or re-programmed by the security program.

At step 312 the app is signed with a new key, for example, with the keyof the service provider or the key of the enterprise providing thesecured app. The re-factored, secured version of the app is returned tothe handset device. In another embodiment, the app is wrapped with thesecurity layer on the phone. At step 314, in one embodiment, theoriginal, unsecured copy of the app is deleted from the handset device.This may be done by the secured version of the app once it is downloadedonto the handset. In other embodiments, this is not done and bothversions remain on the mobile device. At this stage the process iscomplete.

FIG. 4 is a flow diagram of a method performed in policy manager 202 inaccordance with one embodiment. At step 402 the governor or othersecurity policy individual is enabled to define, generate, and createsecurity policies. This may be a network administrator for an enterprisedeciding a vast array of mobile device security policies for hundreds ofemployees using dozens of enterprise apps (specifically for work) thatmay be downloaded on hundreds or thousands of mobile devices. On theother end of the spectrum, it may be a parent who is setting securitypolicy for three or four apps downloaded by her child on a new mobiledevice. Other examples include preventing or squashing a gaming appusing GPS, preventing an app from using a microphone on the device torecord or eavesdrop on a conversation, among many others. In eithercase, the governor may take into consideration the category of the app,the type and nature of app, the author, the age-appropriateness, andnumerous other factors. For example, has the same author written anyother apps that may have been classified as malware or posed a securitythreat to the device. It may determine whether there are other apps bythe same author. It is at this stage that the governor decides whichrules to apply for each app. In one embodiment, this is done off-line bythe governor. That is, it may be done using user interfaces on a homecomputer or on an enterprise network computer used by an administratorwhere security templates provided by the security program serviceprovider (essentially default templates) may be used or very specificrules may be set using the templates.

At step 404 the security data input at step 402 is used by the appcontrol security program to create the actual policies. At step 406 theapp control security program object code is generated based on the inputfrom the governor regarding security policies created at step 404. Thegovernor or service provider may also update existing security policiesif needed. As described above, the object code may be used to enhancecertain original object code obtained from the disassembled app. Theenhancement code is inserted to adjust security and privacy settings foran app in order to protect the enterprise and end user. The originalapp's behavior is altered which allows the governor to control how theapp behaves. For example, if an app stores sensitive account informationin the clear (i.e., un-encrypted), the behavior could be changed so thatall information the app creates is stored in encrypted form and whichcan only be accessed by that app given that the key to the stored,persistent data would be unique to the app. In many instances theenhancement code can improve the apps performance since the code isoptimized for a particular use scenario.

FIG. 5 is a flow diagram showing a process of a security-wrapped appexecuting on a handset or mobile device in accordance with oneembodiment. At step 502 the behavior of the app when the app executes orimmediately before it executes on the device is altered or modified. Forexample, behavior modification may include authentication during appinitialization; e.g. smart/CAC card, or password challenge. Some apps,as originally designed, may not require a password for security,however, a secured version of an app which has been modified may requirethat the user enter a password. At step 504 the secured app executes onthe mobile device by the user activating it (e.g., tapping on the iconif the device has a touch screen). Upon execution of the app, in oneembodiment, control can take one of four options. As is known in theart, when an app executes, it makes calls or requests to the deviceoperating system in order to carry out its functions. In many casesthese calls may be harmless or pose no significant security threat tothe phone or device. If this is the case, the call may be allowed topass to the operating system as shown in step 506. Here the call is madeto the device operating system and the app executes in a normal manner.

If the security layer or wrapper around the app detects that the app ismaking a request that may pose a security threat to the device, the appsecurity layer may enhance or modify the request before it is passed tothe operating system or other software or hardware component in thephone. This is shown at step 508. In one embodiment, the governordetermines which calls are permissible by examining the one or morepolicies. For example, the governor may determine that all data shouldbe saved in encrypted form. In another example, the governor may decidethat only a select group of trusted apps should have data on a soldier'sGPS coordinate. In one embodiment, there is no runtime logic todetermine what is safe, a potential threat, or an actual threat; it isessentially pre-declared by the governor in the policy created at step404 above. In another embodiment, there may be some runtime logic. Forexample, an app may be trying to send out expensive SMS text messages.The app control program may determine this and block the app fromsending more than a certain number of text messages, for example, it maylimit it to transmission of one message. The enhancement may be addingsomething new, such as a password requirement. In another example, ifthe call is to save data on the mobile device memory, the secured appmay actually back up the data to a storage area in the cloud or on theInternet (i.e., off the device). In another example, the data related tothe call may be encrypted.

At step 510 the secured app may determine that the call is an actualthreat and should be dealt with in a more severe manner than at step508. For example, it may have decided that based on the policy for anapp, that if a camera on the device is accessed while in a securebuilding (e.g., the Pentagon), the app should immediately be terminated.Merely enhancing the request may not be sufficient in this case. At step510, the request may not be allowed to proceed to the operating systemor any other component of the device. However, in one embodiment, aresponse is returned to the app, but that response is intentionally notaccurate or correct. It is essentially an obfuscated response. Forexample, it may be a GPS coordinate that is not the actual physicalcoordinate of the device (e.g., the device is in California, but the GPScoordinate that is returned to the app is a coordinate in Nebraska).This may be desirable when apps are used by children. Other examples maybe returning bad or garbled data results if an app that should only runwithin a restrictive environment (e.g., a secure office area) isdetermined to be running outside that environment (e.g., at home). Inthis example, the app may be partially crippled so that the app can onlyaccess unclassified data and wherein classified information isnullified. In another example, when a user is attempting to paste orcopy sensitive data from a classified app to a non-classified app, theapp control program may change the copy of the data that is being pastedto garbage or essentially make it meaningless. After either steps 506,508, or 510 have completed, the security-wrapped app continues executionon the mobile device at step 514.

At step 512 the security layer around the app has determined that thecall being made by the app or that the app execution behavior in generalposes too high a security threat level to the mobile device. In thisextreme case, the security layer decides to terminate execution of theapp and/or delete the app. For example, the app may be using too manyresources on the phone, such as bandwidth, or is making too manyhigh-risk calls to the operating system thereby over-exposing the mobiledevice. In this case, the app can simply be deleted from the phone orthe app may be terminated. The user may not be able to re-execute it orre-install it. For example, an employee may not install that app againon the company phone because it was exposing sensitive company data. Orit may be determined that an app is secretly collecting data on thephone or installing malware.

FIG. 6 is a system architecture diagram of the app security controlsystem in accordance with one embodiment. A trigger manager component602 handles two events, one for generating a new policy 604 and anotherfor updating policy parameters 606. Such events can be triggered byvarious systems. For example, a console administrator or governor mightapply a new policy to all devices (a manual operation). Or a networkmonitoring application, after detecting suspicious traffic originatingfrom a device (or app), could push a new policy that would prevent auser/device/app from accessing network resources (an example of anautomated operation). The various systems or entities that have theauthority to change/update polices, do so through the trigger manager602.

New policy output 604 is input to a policy definition file 608 which maybe generated at runtime and may include various types of code andextensions, for example, specific to the app control service provider,or to the app/user/device the policy applies to. Policy definition file608 is input to a policy compiler 610 which has two outputs. One outputis a wrapper definition file 612. This file is input to an app wrappercomponent 614. App wrapper component 614 is responsible for generatingsecure app by injecting custom binary code (native or bytecode) into anapp, downloaded directly, for example, from an app store. Or the appcould be an app the user downloaded on to his device, and then uploadedto an “AppControl” server.

App wrapper component 614 may have three inputs: apps from one or moreapp stores 616, certificate key management data from identity managementcomponent 618, and hardened components 620. Key management data is usedto tie the identities of the user, device, and the app, and ensure thatany operation subject to policy control can be tied to a specificuser/device/app. This also ensures that a wrapped application can onlybe run on a specific device to prevent a malicious app fromcircumventing policies and hardened components 620 (for example “Devicesecurity framework”). The output from app wrapper 614 is a wrapped app622 which is downloaded or installed onto mobile device 624 via thedevice's controller 626. Device controller 626 responsibilities include:download app from the app wrapper; ensure that app running on thedevices are appropriately wrapped apps (e.g., app wrapped for user1should not be installed/run on device for user2); report list/version ofinstalled applications to allow the management console to controlpolicies for each device/user/application; and download policyparameters when appropriate. Wrapped app 622 resides on device 624coupled with policy parameters 628.

Returning now to policy compiler 610, the other output is a runtimepolicy definition file 630. This file is input to a runtime policycompiler 632 which also accepts as input policy parameters 606(specified by the management console, or other subsystems). Output fromcompiler 632 is a device runtime policy file 634. This file 634 isdownloaded onto device 624 as shown as policy parameters 628, and isused to customize the policies applied to wrapped app 622.

Described below are various use cases and capabilities of the appcontrol security program of the present invention. One use case involvesthe separation of work life and personal life on a mobile phone. Thereare apps for the user's personal use and apps that the user's employer(or a business partner of the employer) may have provided and the appsoperate on the same phone, which is often the user's personal phone. Thegovernor who determines security of the apps that need to be secured onthe user's phone may block copy/paste operations between apps (such ase-mail apps). The governor may set policies for the work-related appsthat perform selective wipes of apps and associated files. Userlocation-based policies may also control where certain apps may execute.Examples of levels of protection because of malware are denying accessto contacts, denying transmission of SMS without consent, and the like.

Another example of a use case is app control. Using the presentinvention, white and black listing of apps may be implemented, as wellas full deletion of apps according to the policies set by a governor. Anapp may be ‘sandboxed’ to protect the other apps, software, and hardwareof the device. Other capabilities may include identity-based control ofapps or services and highly granular control over app behavior. Trojanidentification is another use case that can be implemented with the appsecurity program. For example, each app and content may be encrypted toprevent rogue apps from gaining access to and stealing confidential dataon the phone. The security program may also be able to identifyanomalous system call behavior of an app to identify malicious Trojanapps that act outside of their published intent.

Another use case is back-up and recovery of app data in which ITsecurity administrators and governors have data revision control and canimplement app and device content migration through back-up and restoreoperations. In another use case is network traffic monitoring. The appon the mobile device may be brought under the visibility of existingenterprise IDS/IPS/Web filtering infrastructure to allow for inspectionand control of app communications. The app security program can alsointegrate with third-party DNS services, such as Symantec's DNS serviceto identify malware. All app communications may be encrypted, includingcommunications at the mobile phone service provider. Other use casesinclude session continuity, consumer privacy (e.g., GPS obfuscation,implementing safe DNSs), and intercepting payment/transaction messagesfrom the mobile device (i.e., operating in the middle of mobile commercestreams).

In one embodiment, the app security service is offered by a third-partyservice provider, for example, to make apps used by end-users orindividuals (i.e., users not associated with an employer or enterprise).For example, a parent may want to obfuscate the GPS of a child's phonebecause the parent does not want a social network site, such asFacebook, to know where the child is, essentially disabling GPS. Inanother embodiment, an app store, operated by a wireless phone carrier(e.g., Verizon, AT&T) may offer a secured app for an extra charge orpremium. A customer of the carrier can download the secured app from themarketplace or online store instead of the unsecured version by payingan extra amount. In another embodiment, an enterprise may have its ownapp store for its employees, partners, and the like, where users canonly download secured versions of the apps (which may be referred to as“hard” apps). These apps may have many of the security featuresdescribed above as defined by a governor (security administrator) at theenterprise, such as blocking copying and pasting e-mail or corporatedata, killing an app from the user's phone if the user leaves thecompany, and so on. A mobile phone carrier's DNS can typically accessany site, but the app security program can block a mobile device browserso that it can access only a safe DNS (e.g., Symantec's DNS) from whereonly safe Web sites may be accessed. In another embodiment, the appsecurity program provider can work with the mobile device manufacturerto incorporate the app security program or functionality into thehardware and software operations of the device. In this embodiment,described below, a user can download an unsecured app and make issecured on the phone or device itself before executing and does not haveto access a third-party service to have the app secured or ensure thatthe app is secured before being downloaded onto the device.

As can be seen from various embodiments described above, the security ofthe mobile device extends beyond the device itself and is applieddirectly to the apps that are downloaded onto the device. Companies andother entities are able to take advantage of apps more freely withouthaving to worry about the security risks, such as data leakage ormalware infection of the company's enterprise IT system. Companies canmaintain governance of its corporate data.

In another aspect of device security and app execution, a user downloadsan unsecured app and has it execute with a policy enforced by an enginepre-deployed on the device. In this manner the app is essentiallysecured on the device (using a policy on the device) after which thesecurity-enforced app can execute. In this aspect of device security andapp execution, a third-party app security provider may integrate orpre-deploy its services with existing services (e.g., firmware) offeredby the device manufacturer. As such, this embodiment may be referred toas a pre-deployment embodiment. That is, the provider and the devicemanufacturer work together so that the device (made by the manufacturer)contains software and/or firmware that interacts or communicates withthe device operating system and is integrated in the device. In thisembodiment, the device manufacturer can inform (e.g., advertise to)potential customers that its device, such as a smart phone, is moresecure with respect to app execution than a competitor's device. Thecustomer still downloads apps in a familiar or conventional manner,where the apps are likely to be unsecured (i.e., unwrapped), and whenthe app executes on the device, it is essentially secured and issignificantly less likely to cause damage to the device.

In reference to components and modules from the embodiments describedabove (i.e., post-deployment embodiments), this aspect of the inventionutilizes what may be described as the equivalent of policy manager 202.That is, the functions of policy manager 202 are implemented in thepre-deployment embodiment using other modules and techniques. In oneembodiment, policy wrapper 208 described above may not be needed on thedevice because the security enforcement is done via interpreting orcompiling a policy by an enforcement layer. In some devices, such asmobile devices, there is often a Type 2 hypervisor or app “sandbox”operating above the operating system software. This conventionalhypervisor or sandbox either allows an app to execute or does not; itprovides a somewhat limited binary functionality with respect to appsecurity. In certain aspects of the present invention, described below,another type of hypervisor operates on top of the conventional Type 2hypervisor, where logic enabling more than mere ‘allow or do-not-allow’type functionality is performed.

Normally apps operate by interacting within a sandbox layer above theoperating system of the device. This is to ensure that the apps do notinterfere with each other during execution. In iOS, the apps utilizeshared object files and execution goes through an SWI instruction. Thesandbox is part of the iOS operating system.

As is known in the art, one or more apps may execute in the sandbox (orsimilar virtual environment) on the device at any given time. In oneembodiment of the present invention, an app policy enforcement layer orengine is implemented between the apps and the sandbox. FIG. 7 is ablock diagram showing a structure for apps security on a device inaccordance with one embodiment of the present invention. This structurehas modules and components that reside on the device, e.g., a smartphone, tablet, or TV. Shown are several apps, where each box 702 a, 704a, 706 a . . . represents the software for each app residing on thedevice's internal memory (not shown). Attached to each app is a policy702 b, 704 b, 706 b . . . . As noted above, some apps may not have apolicy. However, in most cases, policy manager 202 has performed itsfunctions, that is, creating and managing policies for the user's apps.Since the policies are on the device (or they are downloaded onto thedevice with the app), the policy manager's functions are done. Thepolicies for each app, or generic policies for the user, are already onthe device. However, as described below, there is a process to ensurethat the app has an associated policy before it is allowed to execute orperform system calls. App policy enforcement layer 706 contains logic todetermine what should be done each time a system call is made by an app.When an app is downloaded onto the device by the user, the app does nothave to be previously wrapped or secured; it may be unwrapped, as a vastmajority currently are. It is also possible that a secured or wrappedapp may be downloaded and the same concepts and methods described belowcan apply.

As noted, app policy enforcement layer 706 is a software engine thatresides on the device, but may be supplied and created by an app controlservice provider and integrated onto the device by the devicemanufacturer. The logic performed by layer 706 is described in FIG. 8.Operating under layer 706 is a conventional Type 2 sandbox 708 and theoperating system software 710.

Enforcement layer 706 determines how an app should behave when itexecutes. It examines the policies to determine what actions should betaken when it executes. Enforcement layer 706 may not have any knowledgeof how an app should behave with respect to security of the device. Thatis, layer 706 does not know what the app is allowed or permitted to doon the device. In one embodiment, the only way it can know is byexamining the policy associated with the app. In one embodiment, layer706 interprets the policy, comprised of computer code, when the appmakes a system call or request. Upon this interpretation, layer 706determines how the app may execute or behave on the device. In oneembodiment, after the policy has been interpreted by layer or engine706, one of four actions can be taken. These four actions are the sameas those described above. They are shown again in FIG. 8 in the contextof security wrapping an app on the device (pre-deployment embodiment).

FIG. 8 is a flow diagram of a process of applying a security policy toan app before execution on a device in accordance with one embodiment.At step 802 an app that is already executing makes a system call to thedevice operating system. In one embodiment, the steps of applying thepolicy and determining what security actions to take occur only afterthe app makes an actual call to the device operating system. At step 804enforcement layer 706 checks whether there is a policy for the app thatis executing. This may be done with assistance from the policy manager.An example of a policy is provided below. If there is no policy for theapp, a default policy for the app or user is obtained from devicememory. A default policy is set by the user or the device manufacturer.

If there is a policy, control goes to step 808 where the policy isapplied to the app on the device. In the described embodiment, thepolicy is interpreted by engine 706. Once applied, enforcement engine706 knows how the app can behave, that is, it knows what it can allowthe app to do. In another embodiment, enforcement layer 706 may compilethe policy instead of interpreting it. For example, it may perform a‘just-in-time’ compile operation, generating code on the spot, for theapp where the code is unique for the app. As is known in the art, JITcompiling is generally more efficient than interpreting, and typicallycan be done only if allowed by the operating system. Typically, dynamicloading of code is allowed only to privileged operating systemcomponents. In another embodiment, sandbox 710 (Type 2 hypervisor) canalso be protected by collapsing sandbox 708 into operating system 710.

After step 808, enforcement layer 706 applies its logic and determineswhat action to take with respect to app behavior or what action the appcan take at step 810. The call may be no threat to the device and may beallowed to simply pass to the operating system as shown in step 814.From there control goes to step 820 where the app continues executionusing app policy enforcement layer 706. If enforcement layer 706 detectsthat the app is making a request that may pose a security threat to thedevice, enforcement layer may enhance or modify the actual requestbefore it is passed to the operating system or other software orhardware component in the phone as shown in step 816. After the requestis modified, it is allowed to pass to the operating system and controlgoes to step 814 (and then to step 820). The enforcement layer 706 maydetermine that the call by the app is an actual threat and should bedealt with in a more severe manner than at step 816. For example, therequest may not be allowed to be sent to the operating system or anyother component of the device. However, in one embodiment, even thoughthe request may be blocked, a response is still returned to the app, butthat response is intentionally not accurate or correct as shown in step818. It is an obfuscated or deliberately misleading response. Ifenforcement layer 706 has determined that the call being made by theapp, or that the app execution behavior in general, poses too high asecurity risk to the device, the app is terminated or deleted at step822 by enforcement layer 706. The process ends after step 822 (i.e.,control does not go to step 820). Control then goes to step 820. Fromstep 820 control goes back to step 810 where enforcement layer 706determines what action to take.

This embodiment may be referred to as a container approach, in that acontainer wraps around the app. Here the container is part of sandbox708. In other systems presently in use, there is essentially a bigcontainer and all apps must be written and must execute in the singlecontainer (e.g., Good Tech). In order to execute out of the container,the app must leave the container. In the described embodiment of thepresent invention, two different apps, one secured and the otherunsecured, can run in enforcement layer 706 at the same time.

As noted, when an app is downloaded, one or more policies may bedownloaded with the app. A call or request is made to a policy managerto look up policy data needed for that particular app. In the describedembodiment, the app is not modified.

As is evident in the various embodiments, a pre-deployment scenario andthe other embodiments, app policies are a key element in ensuring thesecurity of the device. An example of a policy may be that if two appsare from the same author and, therefore, have the same private key, andboth apps attempt to execute at the same time, certain actions may betaken, such as preventing the two apps from communicating with eachother or sharing information. One app may be a contact manager and theother may be an SMS texting app. Because they have the same signature,the two apps can essentially “see” each other and collude. It ispossible that two or more apps from the same author that are executingat the same time can share data and cause harm to the device, eventhough each app may be benign if executed separately. The policy mayprevent apps signed with the same private key from exchanging data insandbox 708, which operates below enforcement layer 706. In thisrespect, the described embodiment of the present invention is improvingoperations of sandbox 708. For example, the present invention mayeliminate or reduce the need for binary operations, such as blacklistingand whitelisting of apps, and the like.

It is worth noting that the service provider or the entity providingsecurity for the apps performs all the functions described above, thatis, it does all the steps necessary for securing the app on the mobiledevice from beginning (receiving an original, unwrapped app) to end(producing a security-wrapped app on the mobile device) for each andevery app. For example, the service provider receives the original app,strips it, parses it, re-compiles it, and re-signs it and then puts itback in app storage. During the processing, the security provider, forexample, locates the relevant or correct classes and substitutesdifferent classes. It essentially performs this same substitution orinjection of classes for all copies of the same apps, regardless of thespecific needs of the user. Given the volume of apps being developed anddownloaded (measuring in the millions or billions over a period ofyears), performing this class substitution for each copy of the same appwould take a significant amount of processing and power. It would bedesirable to facilitate the process of security wrapping the app andmake the process more efficient. One way to do this is to determine whatcan be done for all app and what needs to be done to the apps forspecific users.

A significant amount of processing can be done before an app ispersonalized for a particular user. For example, with reference to FIG.3, steps 312 and 314 can be performed after the app has beenpersonalized, customized or obfuscated (as described below), and thismodification can be done to an app template to which an active userpolicy may be applied or merged, or other functions can be performed,such as randomization.

FIG. 9 is a flow diagram of a process similar to the process describedin FIG. 3. Steps 902 to 908 are, in one embodiment, the same as steps302 to 308, but are repeated here for completeness. It is a flow diagramshowing a process of making an app secure before downloading it using atemplate, followed by personalizing the app, in accordance with oneembodiment of the present invention.

At step 902 a copy or clone of the app that is to be secured is made onthe device. By making a copy, the original app is preserved giving theuser an option to use either the secured or unsecured version and alsoprotects the user's ability to use the app if something goes wrong withthe app control process.

At step 904 the app is decapsulated. Most, if not all, apps have digitalsignatures signed by the author/developer. At step 904, as part of thedecapsulation, the digital signature is removed from the app. This maybe done using techniques known in the art. These and other steps providethe core object code of the app which may now be operated on by the appcontrol program. At step 906, the core object code app may be eitherdisassembled or decompiled to obtain the executable object code. Forexample, it can be either “native code” (CPU instructions) or bytecode(virtual machine instructions, such as Java or .Net).

At step 908 the app object code is augmented with object code from theapp security program. For example, this object code may include classfiles which are replaced with class files from the security program. Theobject code generally provides an interface to the mobile deviceoperating system. Generally, the app security program goes through theassembly language code. The specific items located are SoftwareInterrupts (SWIs) within the object code and which are replaced with abranch to an app control security program layer which may then determinewhat further actions to take, such as making the request, enhancing theresults, and others, as described below.

At step 910 an app template is created. An app template may be describedas a version of the app code that contains, for example, markers orplaceholders, that are used to customize the app based on an active userpolicy or may be used to obfuscate the app code. An app need only haveone app template (it may be referred to as “templatizing the app”). Withsome (possibly most) apps, an app template is nearly complete. That is,it will typically be missing only a few items needed to be a fullyfunctioning, security-wrapped app. This template is then modified basedon the user's or a group's specific policy requirements. By customizingan app template, much of the processing needed for security wrapping anapp may only be done once. For example, steps 902 to 910 may only bedone one time by the app security provider. The markers are used tolocate places in the app code where, for example, substitutions can bemade to customize the app.

At step 912, after substitution of the object code (or substitutions ofSWIs) has been made, the app security program prepares the securitywrapped app for execution on the mobile device. The object codesubstituted into the app by the security program generally provides abridge or connection between the app and the mobile device operatingsystem. The security program class files may be described as wrappingaround the operating system class files. The app security program classfiles are generated based on the policies created earlier (by input fromthe governor). The app is essentially re-wired for execution on thehandset. It is re-wired to use the app security program layer inaddition to the security provided by the mobile device operating systemlayer.

At step 914 the app is personalized or obfuscated by turning markers ON,assuming that the markers are OFF when the template for the app iscreated. In one embodiment, content in an active policy for a user ismerged into the template. If a user policy indicates a certainrequirement and there is a relevant marker for that requirement, themarker may be turned ON or made active. If the policy is not active,then the marker is unaffected. For example, a GPS marker may be enabledor made active if a user's policy indicates so, otherwise it is leftOFF. Other features may not have a marker, such as a copy/pasterequirement which may be required in all apps.

In other embodiments, markers or placeholders may be used to make an apprandom. For example, special data may be stored in different places inan app for different users so that that special data is not alwaysexpected to be in one location. In another example, they may be used togenerate code in different patterns for different users. In this manner,if one customized app is hacked or infected, the hacker cannotnecessarily do the same to other apps. It enables another layer ofsecurity in the security-wrapping process. In many cases, theobfuscation or personalization process may only consume insignificantprocessing time given that the app template is almost complete andturning markers ON or doing any other functions to obfuscate the code atthis stage will likely take little processing time. As such, much of theprocessing for security wrapping an app is done once to create the apptemplate and the remaining steps are done for individual users or groupsof users.

At step 916 the app is signed with a new key, for example, with the keyof the service provider or the key of the enterprise providing thesecured app. The re-factored, secured version of the app is returned tothe handset device. In another embodiment, the app is wrapped with thesecurity layer on the phone. At step 918, in one embodiment, theoriginal, unsecured copy of the app is deleted from the handset device.This may be done by the secured version of the app once it is downloadedonto the handset. In other embodiments, this is not done and bothversions remain on the mobile device. At this stage the process iscomplete. In this manner, a blueprint of an app is made through thecreation of an app template, but this blueprint is a flexible blueprintand may be modified in small but important ways that allows forcustomizing the app for a particular user and, thus, creating differentapps for different users, where each app is security wrapped asdescribed above.

In another aspect of the present invention, security wrapping an appenables another capability or feature: data integrity by preventingbreak point insertions. Various embodiments allow fine grain control ofaccess to information. This capability enables an app to be segmentedautomatically during the app wrapping process. The result is segmentingan app into multiple logical components, including “trusted executionmodules” within the app. A wrapped app is bundled or packaged in amanner to include multiple logical modules and components some of whichare trusted execution modules, also referred to as trusted applets.These modules/components may be loaded into different parts of themobile device when the app is first executed.

FIG. 10 is a block diagram showing an overview of the process ofsegmenting an app through security wrapping in accordance with oneembodiment. An app 1002 is made up of multiple app software modules,shown as essentially a monolithic block 1004. These modules andcomponents may be of various sizes and execute various functions withinthe app. App 1002 goes through the security wrapping process describedabove and shown in FIG. 10 by arrow 1006. Security wrapping 1006 causesapp 1002 to be segmented into a plurality of modules/components 1008 a,1008 b, 1008 c . . . and trusted modules or applets 1010 a, 1010 b, 1010c . . . . Modules/components 1008 a-c . . . execute in the operatingsystem of the mobile device and trusted applets 1010 a-d . . . executein a trusted execution environment. This configuration is described ingreater detail below.

As described above, there are generally two modes of security wrappingan app. One may be described as “pre-loaded,” where the app securityengine is pre-loaded on to the mobile device by the device manufacturer.In this mode, any app that is downloaded onto the device isautomatically wrapped at download time and is done transparent to theuser. In another mode, referred to as “after-market,” the mobile deviceuser or another party decides to wrap an app once it has beendownloaded. The actual security wrapping is done by a third-partyservice or by the app provider, but not by an engine on the deviceitself as in the case of the “pre-loaded” scenario.

Various embodiments of the multiple, logical component bundling forcreating an app and data integrity implementation described herein maybe applied to both “pre-loaded” and “after market” modes.

With the present invention, even if a device is rooted (e.g., infectedwith malware) and the operating environment is hostile, embodiments ofthe present invention are still able to protect the app and data on thedevice.

One feature of mobile devices is that there is typically an operatingenvironment on the device that is more secure than the primary orgeneral environment where most of the device operations take place. Thismore secure environment may be referred to as a trusted executionenvironment or TEE. Modules that execute in the TEE are protected frombeing scrutinized and data stored there cannot be examined or tamperedby external entities. TEE memory cannot be looked at by any externalprocesses or processes running in the operating system. Generally, codethat runs in TEE cannot have break points inserted. As such, it would bedesirable to protect app code by having at least certain modules or codeof the app execute in TEE so that the app remains secure and so itsexecution does not harm or cause further damage to the device. A hackershould not be able to insert break points into app code and, thereby,obtain sensitive information such as passwords, login data, and thelike.

FIG. 11 is a block diagram of a mobile device and various logicalcomponents and execution areas within the device in accordance with oneembodiment. A device 1102 has an operating system environment 1104 and aTEE 1106. Environment 1104 may be characterized generally as the normalor conventional operating environment for the device. It is the areacontrolled primarily by the operating system (in many cases, a “rich”operating system as currently commonly run on smart phones and tablets).Operating system environment 1104 provides an execution space formodules/components 1008 a-c . . . . As described above, these are theregular modules of app 1002. TEE 1106 is a trusted and secure executionspace where trusted applets 1010 a-d . . . are able to execute and wheresecret or confidential data, shown as block 1108, may be stored withoutexternal processes being able to observe or examine the data. By havingtrusted applets 1010 a-d . . . execute in TEE 1106, hackers cannotinsert break points into app 1002.

It is possible for an app developer to take steps to ensure that ahacker cannot insert break points into the app code. However, this isdifficult to do if the hacker has the patience and resources to studyand closely examine app execution on a mobile device. In addition, manyapp developers may not have the expertise or time to incorporate thislevel of security provision, thereby making it difficult for determinedhackers from inserting break points. As noted, methods of the presentinvention can ensure that these security provisions are in place andbundle the app code in a correct and automated manner.

Uses and implementations of the present invention are best shown throughan example. A video game app may have a module within the app code forthe game that protects, for example, a player's high score. This modulemay be treated as a trusted applet that executes in the TEE and the highscore may be stored in TEE memory. Building this customized, trustedapplet, which requires coordination among different components of theapp, is typically a complex task. Methods of the present inventionaddress creating the trusted applet for the high score and loading itinto the TEE. The trusted applet is likely one among several others thatare bundled together with regular modules of the app code. These bundledregular modules and trusted applets collectively comprise the video gameapp.

Methods of the present invention address building the trusted applet forexecution in TEE correctly. Other portions of the app run in the O/Senvironment, often in a rich O/S environment. In this respect, theresulting app may be referred to as a hybrid “TEE-Rich O/S” app. Asnoted, the security wrapped app is automatically generated on the mobiledevice.

In one embodiment, the automatic app wrapping process includes insertingDigital Rights Management (DRM) features into the app. Referring againto FIG. 11, DRM features and a key share are shown in block 1110.Presently, when an app developer wants to incorporate DRM into an app,the app is typically developed from the “ground up” to have DRMfeatures. DRM features are generally not added to an app after initialdevelopment; it is often difficult to essentially retro-fit an app orany code with DRM features. Experience has shown that apps that havestrong DRM features often provide poor, or less than desirable, userexperiences. On the other hand, apps that have positive or strong userexperiences are, in part, that way because they are unencumbered by DRMfeatures.

Embodiments of the present invention of logical component bundling forcreating an app also enable insertion of DRM features into an app. Thus,an app that has a good user experience can have certain DRM featuresadded. In one embodiment, the process uses split-key share.

A data lease feature may also be used to cause a key share to expireafter a certain amount of time (essentially a temporary lease of the keyshare). It is generally not desirable to allow a key store to persistover a long period of time, as it is more likely that over time it willbe compromised from a longer exposure to hackers. This DRM split keyruns and is stored in the TEE. As such, it cannot be copied out orobserved by external processes. This also prevents “group force” of thekey share. By storing the key share in TEE, it cannot be cloned nor canthe device be reversed engineered to get access to the data.

In one embodiment, user access and other DRM-related information areadded to the header or to the beginning of each file or document in theapp. This is done in a manner that is transparent to the app (that is,the app is unaware that its files are being modified). In oneembodiment, it is done during the app wrapping process. The data that isadded may include identifiers of individuals or groups who have one ormore degrees or types of access to the file or document.

In one embodiment, the information added to the file or document may bein the following pseudo-format: a user/set of users+a device/set ofdevices+app identifier. There can be various levels of DRM constraintswithin each of these variables. For example, the data may allow anEmployee A to use one device, Device A, to access, for example, threecompany Apps and a PDF reader. Or, a group of five specific employeescan use any one of three devices to access all the company's apps. Inanother example, an employee assigned or designated to be in aparticular group (e.g., a division of a company) may use any mobiledevice in the company to access a specific set of apps (e.g., apps thatare needed only by employees in that division or group). In thisscenario, a specialized suite of apps can be used by any employee in aparticular division, for example, and can use any mobile device in thecompany to access any app from that suite of apps. Of course, manydifferent scenarios are possible, some of which may not have anylimitations on which devices can be used (i.e., there are onlyrestrictions regarding employees/users and apps) or may not have anylimitations on employees/users (e.g., there are only limitations ondevices and apps). In this manner, a security administrator at anenterprise can choose which apps, devices, and users can use. This goesbeyond the conventional one-to-one pairing between one or more securityfeatures and one device normally associated with DRM capabilities.

In one embodiment, these DRM-type features are implemented in a mannerthat is transparent to the app. That is, the app is essentiallyunaltered and executes in its normal fashion. However, the app securitywrapping process enables or injects these DRM features and the abilityto control the level of security of the app.

FIGS. 12A and 12B illustrate a computing system 1200 suitable forimplementing embodiments of the present invention. FIG. 12A shows onepossible physical form of the computing system. Of course, the computingsystem may have many physical forms including an integrated circuit, aprinted circuit board, a small handheld device (such as a mobiletelephone, handset or PDA), a personal computer or a super computer.Computing system 1200 includes a monitor 1202, a display 1204, a housing1206, a disk drive 1208, a keyboard 1210 and a mouse 1212. Disk 1214 isa computer-readable medium used to transfer data to and from computersystem 1200.

FIG. 12B is an example of a block diagram for computing system 1200.Attached to system bus 1220 are a wide variety of subsystems.Processor(s) 1222 (also referred to as central processing units, orCPUs) are coupled to storage devices including memory 1224. Memory 1224includes random access memory (RAM) and read-only memory (ROM). As iswell known in the art, ROM acts to transfer data and instructionsuni-directionally to the CPU and RAM is used typically to transfer dataand instructions in a bi-directional manner. Both of these types ofmemories may include any suitable of the computer-readable mediadescribed below. A fixed disk 1226 is also coupled bi-directionally toCPU 1222; it provides additional data storage capacity and may alsoinclude any of the computer-readable media described below. Fixed disk1226 may be used to store programs, data and the like and is typically asecondary storage medium (such as a hard disk) that is slower thanprimary storage. It will be appreciated that the information retainedwithin fixed disk 1226, may, in appropriate cases, be incorporated instandard fashion as virtual memory in memory 1224. Removable disk 1214may take the form of any of the computer-readable media described below.

CPU 1222 is also coupled to a variety of input/output devices such asdisplay 1204, keyboard 1210, mouse 1212 and speakers 1230. In general,an input/output device may be any of: video displays, track balls, mice,keyboards, microphones, touch-sensitive displays, transducer cardreaders, magnetic or paper tape readers, tablets, styluses, voice orhandwriting recognizers, biometrics readers, or other computers. CPU1222 optionally may be coupled to another computer or telecommunicationsnetwork using network interface 1240. With such a network interface, itis contemplated that the CPU might receive information from the network,or might output information to the network in the course of performingthe above-described method steps. Furthermore, method embodiments of thepresent invention may execute solely upon CPU 1222 or may execute over anetwork such as the Internet in conjunction with a remote CPU thatshares a portion of the processing.

Although illustrative embodiments and applications of this invention areshown and described herein, many variations and modifications arepossible which remain within the concept, scope, and spirit of theinvention, and these variations would become clear to those of ordinaryskill in the art after perusal of this application. Accordingly, theembodiments described are to be considered as illustrative and notrestrictive, and the invention is not to be limited to the details givenherein, but may be modified within the scope and equivalents of theappended claims.

What is claimed is:
 1. A method of inserting DRM features into an appduring a process of securing the app on a mobile device, the methodcomprising: inserting DRM features into the app via an app wrappingprocess, by the mobile device, using a key share that has a data leaseand that is split into two portions, a first portion residing in atrusted execution environment on the mobile device, wherein the trustedexecution environment cannot be tampered or examined by externalentities, the app wrapping process comprising: segmenting an app into afirst plurality of logical modules, wherein a logical module varies insize and is a segment of app code for a particular function, saidsegmenting triggered automatically when the app is secured on the mobiledevice; creating a second plurality of logical modules based upon adetermination of which modules from the first plurality of logicalmodules perform high security functions; and bundling the app so thatthe app has the first plurality of logical modules and the secondplurality of logical modules; and executing the app, wherein the firstplurality of logical modules execute in the operating system of themobile device and the second plurality of logical modules execute in thetrusted execution environment so that break points cannot be insertedinto the app code.
 2. A method as recited in claim 1 further comprising:adding DRM-related app information to file headers in the app.
 3. Amethod as recited in claim 1 further comprising: injecting DRM-relatedapp information including user names, device identifiers, and appidentifiers into the app when wrapped.
 4. A method as recited in claim 1further comprising: adding security constraints to the app.
 5. A methodas recited in claim 1 further comprising: inserting identifiers of oneor more users into an app file, said one or more users authorized to usethe app.
 6. A method as recited in claim 1 further comprising: insertingidentifiers of one or more devices into an app file, said one or moredevices authorized to execute the app.
 7. A method as recited in claim 1further comprising: storing a key in the trusted execution environment.8. A non-transitory computer readable medium containing programinstructions for inserting DRM features into an app during a process ofsecuring the app on a mobile device, wherein execution of the programinstructions by one or more processors of a computer system causes theone or more processors to carry out the steps of: inserting DRM featuresinto the app via an app wrapping process, by the mobile device, using akey share that has a data lease and that is split into two portions, afirst portion residing in a trusted execution environment on the mobiledevice, wherein the trusted execution environment cannot be tampered orexamined by external entities, the app wrapping process comprising:segmenting an app into a first plurality of logical modules, wherein alogical module varies in size and is a segment of app code for aparticular function, said segmenting triggered automatically when theapp is secured on the mobile device; creating a second plurality oflogical modules based upon a determination of which modules from thefirst plurality of logical modules perform high security functions; andbundling the app so that the app has the first plurality of logicalmodules and the second plurality of logical modules; and executing theapp, wherein the first plurality of logical modules execute in theoperating system of the mobile device and the second plurality oflogical modules execute in the trusted execution environment so thatbreak points cannot be inserted into the app code.